<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>  
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>物资管理/双色球</title>
    <%@ include file="../link_script.jsp" %>
<script type="text/javascript"> 
/*添加用户*/
function add(){
    window.self.location="lucky.do?method=addLucky";
}
/*删除用户*/
function del(){
    var flag = false;
    for (var i = 0; i < document.getElementsByName("ids").length; i++) {
        if (document.getElementsByName("ids")[i].checked) {
            flag = true;
        }
    }
    if (!flag) {
        alert("请选择需要删除的用户！");
        return;
    }
    if (window.confirm("确认删除吗？")) {
    
        with (document.getElementById("list")) {
        
            method = "post";
            action = "lucky.do?method=delLucky";
            submit();
        }
    }
}
/*选择用户，单选框*/
function selectAll(){
    if (list.checkbox.checked == true) {
        for (var i = 0; i < list.ids.length; i++) 
            list.ids[i].checked = true;
        if (list.ids.length == null) 
            list.ids.checked = true;
    }
    else {
        for (var i = 0; i < list.ids.length; i++) 
            list.ids[i].checked = false;
        if (list.ids.length == null) 
            list.ids.checked = false;
    }
}
/*编辑用户*/
function edit(){
    var count = 0;
    var j = 0;
    for (var i = 0; i < document.getElementsByName("ids").length; i++) {
        if (document.getElementsByName("ids")[i].checked) {
            j = i;
            count++;
        }
    }
    if (count == 0) {
        alert("请选择需要修改的用户！");
        return;
    }
    if (count > 1) {
        alert("一次只能修改一个用户！");
        return;
    }
    if (count == 1) {
        window.self.location = "lucky.do?method=editLucky&luckyID=" +
        document.getElementsByName("ids")[j].value;
    }
}
</script>
</head>
<body>
<html:form styleId="list" action="/lucky.do">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_list.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
          <tr>
            <td width="100%" class="STYLE11">&nbsp;<b>数据分析</b>&nbsp;&nbsp;<a href="luckyData.do?method=listLuckyData">历史记录</a>&nbsp;| 
              &nbsp;<a href="luckyData.do?method=listLuckyDataOfBlue">蓝球</a>&nbsp;| 
              &nbsp;<a href="luckyData.do?method=listLuckyDataOfRed">红球</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          </tr> 
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
          <tr>
            <td width="4%" class="tdClass">选择</td>
            <td width="4%" class="tdClass">序号</td>
            <td width="10%" class="tdClass">期号</td>
            <td width="20%" class="tdClass">购买号码</td>
            <td width="4%" class="tdClass">注数</td>
            <td width="10%" class="tdClass">支付金额</td>
            <td width="6%" class="tdClass">中奖等级</td>
            <td width="10%" class="tdClass">中奖金额</td>
            <td width="9%" class="tdClass">购买日期</td>
            <td width="4%" class="tdClass">状态</td>
            <td width="8%" class="tdClass">常用操作</td>
            <td width="*" class="tdClass">...</td>           
          </tr>
          <logic:notEmpty name="luckyList">
          <% int i = 0; %>
            <logic:iterate id="var" name="luckyList">
            <% i++; %>
              <tr>
                <td class="STYLE12"><input type="checkbox" name="ids" value="${var.luckyID}" /></td>
                <td class="STYLE12"><%=i %></td>
                <td class="STYLE12"><bean:write name="var" property="issueNumber" /></td>
                <td class="STYLE32"><font color="red">${var.r1 }&nbsp;${var.r2 }&nbsp;${var.r3 }&nbsp;${var.r4 }&nbsp;${var.r5 }&nbsp;${var.r6 }</font> | &nbsp;<font color="blue">${var.b1 }</font></td>
                <td class="STYLE12"><bean:write name="var" property="luckyNum" /></td>
                <td class="STYLE12"><bean:write name="var" property="payMoney" /></td>
                <td class="STYLE12"><bean:write name="var" property="luckyLevel" /></td>
                <td class="STYLE13">￥&nbsp;<bean:write name="var" property="luckyMoney" />&nbsp;</td>
                <td class="STYLE12"><bean:write name="var" property="payDate" /></td>
                <td class="STYLE12"><bean:write name="var" property="luckyPay" /></td>
                <td class="STYLE12"><a href="lucky.do?method=detailLucky&luckyID=${var.luckyID}">明细</a>
                &nbsp;&nbsp;<a href="lucky.do?method=payLucky&luckyID=${var.luckyID}">结算</a></td>
                <td class="STYLE12">&nbsp;&nbsp;</td>
              </tr>
            </logic:iterate>
          </logic:notEmpty>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
</table>
</html:form>
</body>
</html>

